package com.cuit.circuit;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class CircuitorManager {
    /**
     * 映射servicename -》 熔断器Circuitor
     */
    private final Map<String, Circuitor> circuitorMap = new ConcurrentHashMap<>();

    public Circuitor getCircuitor(String serviceName){
        return circuitorMap.getOrDefault(serviceName, new Circuitor());
    }
}
